from datetime import timedelta

from pandas import DataFrame

import util
from 每日工作.InputFile import Input
from 每日工作 import 故障工单, 预警跟踪

if __name__ == '__main__':
    for i in range(19, 20):
        Input.startTime = f'2025-05-{util.get_day(i)}'
        end = util.to_date(Input.startTime) + timedelta(days=1)
        end = end.strftime('%Y-%m-%d')
        Input.endTime = end
        Input.datetime = end
        故障工单.invoke()
        预警跟踪.invoke()


def filter_company(data: DataFrame, col_name):
    # 筛选分公司
    # data = data[data[col_name].isin(['城一', '房山', '顺义', '朝阳'])]
    return data
